﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace BCTMSRESTful.Configs
{
    public static class HttpContextExtension
    {
        public static async Task WriteAsync(this HttpResponse response, int statusCode, string statusText, CancellationToken cancellationToken = default)
        {
            response.StatusCode = statusCode;

            await response.WriteAsync(statusText, cancellationToken);
        }
    }
}
